package com.corelib.mvp.demo.login.demo.login.presenter;

import com.corelib.mvp.demo.login.demo.login.model.UserModel;
import com.corelib.mvp.demo.login.demo.login.view.LoginView;

/**
 * Created by lenovo on 2016/12/27.
 */
public class LoginPresenter extends ILoginPresenter{
    public LoginPresenter(LoginView view) {
        super(new UserModel(),view);
    }
    @Override
    public void login(String account, String pas) {
            boolean issuccess = getModel().login(account,pas);
            if(issuccess){
                getView().loginsuccess();
            }else{
                getView().loginfail();
            }
    }
}
